package com.d3works.apps.businessproduction.service;

import com.d3works.apps.production.db.ManufOrder;
import com.d3works.inject.Beans;

public class ManufOrderValidateBusinessServiceImpl implements ManufOrderValidateBusinessService {

  @Override
  public long checkTimesheet(ManufOrder manufOrder) {
    OperationOrderValidateBusinessService operationOrderValidService =
        Beans.get(OperationOrderValidateBusinessService.class);
    return manufOrder.getOperationOrderList().stream()
        .mapToLong(operationOrderValidService::checkTimesheet)
        .sum();
  }
}
